#include "dominion.h"
#include "dominion_helpers.h"
#include <string.h>
#include <stdio.h>
#include <assert.h>
#include "rngs.h"
#include <math.h>

/*Test supplyCount. */
int main(){

  struct gameState state;
  int i;
  int n;
  int fail;
  SelectStream(2);
  PutSeed(3);


  //Max supplyCount of any card is 60
  printf("Testing supplyCount\n");
  for (n = 0; n < 2000; n++) {

    for (i = 0; i < 25; i++) {
      state.supplyCount[i] = floor(Random() * 60);

      if(state.supplyCount[i] != supplyCount(i, &state)){
        fail++;
        printf("Test FAILED \n");
      }else{
        printf("Test PASSED\n");
      }
    }



  }

  printf("supplyCount Summary: %i tests failed. %i percent failure rate", fail, fail/2000);




}
